﻿namespace MDXStudio.QueryEditor
{
    using System;
    using System.Collections.Generic;

    public class MyTextSegmentComparer : IComparer<TextSegment>
    {
        public int Compare(TextSegment pTextSegmentA, TextSegment pTextSegmentB)
        {
            int num = pTextSegmentA.StartPosition - pTextSegmentB.StartPosition;
            if (num == 0)
            {
                num = pTextSegmentA.Lenth - pTextSegmentB.Lenth;
            }
            return num;
        }
    }
}

